package com.masterclient.app.businessmodule.usermodule.api;

import com.eoner.baselib.container.CommonBaseResponse;
import com.eoner.common.bean.base.CommonBaseBean;
import com.masterclient.app.businessmodule.usermodule.login.beans.AuthBindNewBean;
import com.masterclient.app.businessmodule.usermodule.login.beans.CaptchaBean;
import com.masterclient.app.businessmodule.usermodule.login.beans.InviteInfoBean;
import com.masterclient.app.businessmodule.usermodule.login.beans.LoginBgBean;
import com.masterclient.app.businessmodule.usermodule.login.beans.LoginResultBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 文件名：UserApi
 * 描 述：只处理用户相关的v1接口
 * 作 者：gyq
 * 时 间：2021-2-22
 */
public interface UserApi {

    /**
    * 用户绑定手机号
    * */
    @POST("/v1/customer/login/user_bind")
    io.reactivex.Observable<AuthBindNewBean> authBind(@Body RequestBody body);

    /**
    * 获取验证码
    * */
    @POST("/v1/customer/sms_captcha_get")
    io.reactivex.Observable<CaptchaBean> getCaptcha(@Body RequestBody body);

    /**
    * 获取邀请人信息
    * */
    @POST("/v1/customer/get_by_invite_code")
    io.reactivex.Observable<InviteInfoBean> getInviteInfo(@Body RequestBody body);

    /**
    * 微信登录绑定手机号短信校验接口
    * */
    @POST("/v1/customer/login/auth_login_phone_bind")
    io.reactivex.Observable<LoginResultBean> thirdCheckCaptcha(@Body RequestBody body);

    /**
    * 找回密码
    * */
    @POST("/v1/customer/login/password_find_set")
    io.reactivex.Observable<LoginResultBean> forgotSetPwd(@Body RequestBody body);

    /**
    * 第三方授权登录
    * */
    @POST("/v1/customer/login/auth_login")
    io.reactivex.Observable<LoginResultBean> authLogin(@Body RequestBody body);

    /**
     * 获取广告信息
     */
    @GET("/v1/ad/get")
    Observable<CommonBaseResponse<LoginBgBean>> getAdInfo(@Query("ad_label") String adLabel);

    /**
    * 密码登录
    * */
    @POST("/v1/customer/login/password_login")
    io.reactivex.Observable<LoginResultBean> pwdLogin(@Body RequestBody body);

    /**
    * 验证码登录
    * */
    @POST("/v1/customer/login/captcha_login")
    io.reactivex.Observable<LoginResultBean> quickLogin(@Body RequestBody body);

    //验证码校验
    @POST("/v1/customer/sms_captcha_check")
    io.reactivex.Observable<CommonBaseBean> checkCaptcha(@Body RequestBody body);
}
